<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen; http://apigen.org" />

	<title>Interface Nette\Web\IUser</title>

	<link rel="stylesheet" href="resources/style.css?v=2011071314" type="text/css" media="all" />
	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
	<link rel="search" href="opensearch.xml" type="application/opensearchdescription+xml" title="Nette Framework API documentation" />
	<script type="text/javascript" src="resources/combined.js"></script>
	<script type="text/javascript" src="allclasses.js"></script>
</head>

<body>
<div id="left">
	<a href="allclasses.html">All Classes</a>

	<h3>Namespaces</h3>
	<ul>
		<li><a href="namespace-none.html">none</a>
		</li>
		<li><a href="namespace-Nette.html">Nette</a>
		</li>
		<li><a href="namespace-Nette.Application.html">Nette\Application</a>
		</li>
		<li><a href="namespace-Nette.Caching.html">Nette\Caching</a>
		</li>
		<li><a href="namespace-Nette.Collections.html">Nette\Collections</a>
		</li>
		<li><a href="namespace-Nette.Config.html">Nette\Config</a>
		</li>
		<li><a href="namespace-Nette.Forms.html">Nette\Forms</a>
		</li>
		<li><a href="namespace-Nette.IO.html">Nette\IO</a>
		</li>
		<li><a href="namespace-Nette.Loaders.html">Nette\Loaders</a>
		</li>
		<li><a href="namespace-Nette.Mail.html">Nette\Mail</a>
		</li>
		<li><a href="namespace-Nette.Reflection.html">Nette\Reflection</a>
		</li>
		<li><a href="namespace-Nette.Security.html">Nette\Security</a>
		</li>
		<li><a href="namespace-Nette.Templates.html">Nette\Templates</a>
		</li>
		<li class="active"><a href="namespace-Nette.Web.html">Nette\Web</a>
		</li>
		<li><a href="namespace-PHP.html">PHP</a>
		</li>
	</ul>

	<hr />

	<h3>Classes</h3>

	<ul>
		<li><a href="Nette.Web.Ftp.html">Ftp</a></li>
		<li><a href="Nette.Web.Html.html">Html</a></li>
		<li><a href="Nette.Web.HttpContext.html">HttpContext</a></li>
		<li><a href="Nette.Web.HttpRequest.html">HttpRequest</a></li>
		<li><a href="Nette.Web.HttpResponse.html">HttpResponse</a></li>
		<li><a href="Nette.Web.HttpUploadedFile.html">HttpUploadedFile</a></li>
		<li><a href="Nette.Web.Session.html">Session</a></li>
		<li><a href="Nette.Web.SessionNamespace.html">SessionNamespace</a></li>
		<li><a href="Nette.Web.Uri.html">Uri</a></li>
		<li><a href="Nette.Web.UriScript.html">UriScript</a></li>
		<li><a href="Nette.Web.User.html">User</a></li>
	</ul>

	<h3>Interfaces</h3>

	<ul>
		<li><a href="Nette.Web.IHttpRequest.html">IHttpRequest</a></li>
		<li><a href="Nette.Web.IHttpResponse.html">IHttpResponse</a></li>
		<li class="active"><a href="Nette.Web.IUser.html">IUser</a></li>
	</ul>

	<h3>Exceptions</h3>

	<ul>
		<li><a href="Nette.Web.FtpException.html">FtpException</a></li>
	</ul>
</div>

<div id="right">
	<form action="http://www.google.com/cse" id="search" onsubmit="if(this.q.value.indexOf('more:')==-1)this.q.value+=' more:api'">
		<input type="hidden" name="cx" value="011549293477758430224:vxofa9ufnhc" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" class="text" /><input type="submit" value="Search" />
	</form>

<div id="navigation">
	<ul>
		<li><a href="overview.html" title="Summary of all namespaces">Overview</a></li>
		<li><a href="namespace-Nette.Web.html" title="Summary of Nette\Web">Namespace</a></li>
		<li class="active">Class</li>
		<li><a href="elements.html">Elements</a></li>
	</ul>
</div>

<div id="content">
	<div id="classSummary">
		<p>namespace <a href="namespace-Nette.Web.html">Nette\Web</a></p>

		<h1>Interface IUser</h1>

		<div class="classDescription">
		
<p>User authentication and authorization.</p>

		</div>



		<div>
			<h4>Direct Known Implementers</h4>
			<a href="Nette.Web.User.html">User</a>
		</div>

		<div class="classInfo">
			<b>Abstract Interface</b><br />
				<b>Author:</b> David Grudl<br />
			<b>Located at</b> <a href="source-Web.IUser.php.html#18">/Web/IUser.php</a><br />
		</div>
	</div>


	<div id="methodSummary">
		<table class="summary">
		<caption>Method Summary</caption>
		<tr data-order="1 login" id="_login">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				void
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_login">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#26" title="go to source code"><b>login</b></a>(
					string
					<var>$username</var>, 
					string
					<var>$password</var>, 
					mixed
					<var>$extra</var> = <span class="php-keyword1">NULL</span>
			)</code>

			<div class="short">
				
<p>Conducts the authentication process.</p>

			</div>

			<div class="detailed">
				
<p>Conducts the authentication process.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$username</code> string <br />
						<code>$password</code> string <br />
						<code>$extra</code> mixed <br />
					</div>


					<h4>Throws</h4>
					<div class="smallList">
						<a href="Nette.Security.AuthenticationException.html">Nette\Security\AuthenticationException</a> if authentication was not successful<br />
					</div>

			</div>
			</td>
		</tr>
		<tr data-order="1 logout" id="_logout">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				void
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_logout">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#36" title="go to source code"><b>logout</b></a>(
					
					<var>$clearIdentity</var> = <span class="php-keyword1">false</span>
			)</code>

			<div class="short">
				
<p>Logs out the user from the current session.</p>

			</div>

			<div class="detailed">
				
<p>Logs out the user from the current session.</p>






			</div>
			</td>
		</tr>
		<tr data-order="1 isLoggedIn" id="_isLoggedIn">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_isLoggedIn">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#42" title="go to source code"><b>isLoggedIn</b></a>(
			)</code>

			<div class="short">
				
<p>Is this user authenticated?</p>

			</div>

			<div class="detailed">
				
<p>Is this user authenticated?</p>




					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getIdentity" id="_getIdentity">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Security.IIdentity.html">Nette\Security\IIdentity</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getIdentity">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#48" title="go to source code"><b>getIdentity</b></a>(
			)</code>

			<div class="short">
				
<p>Returns current user identity, if any.</p>

			</div>

			<div class="detailed">
				
<p>Returns current user identity, if any.</p>




					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Security.IIdentity.html">Nette\Security\IIdentity</a> </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 setAuthenticationHandler" id="_setAuthenticationHandler">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				void
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_setAuthenticationHandler">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#54" title="go to source code"><b>setAuthenticationHandler</b></a>(
					<a href="Nette.Security.IAuthenticator.html">Nette\Security\IAuthenticator</a>
					
					<var>$handler</var>
			)</code>

			<div class="short">
				
<p>Sets authentication handler.</p>

			</div>

			<div class="detailed">
				
<p>Sets authentication handler.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$handler</code> <a href="Nette.Security.IAuthenticator.html">Nette\Security\IAuthenticator</a> <br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="1 getAuthenticationHandler" id="_getAuthenticationHandler">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Security.IAuthenticator.html">Nette\Security\IAuthenticator</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getAuthenticationHandler">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#61" title="go to source code"><b>getAuthenticationHandler</b></a>(
			)</code>

			<div class="short">
				
<p>Returns authentication handler.</p>

			</div>

			<div class="detailed">
				
<p>Returns authentication handler.</p>




					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Security.IAuthenticator.html">Nette\Security\IAuthenticator</a> </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 setNamespace" id="_setNamespace">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				void
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_setNamespace">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#67" title="go to source code"><b>setNamespace</b></a>(
					string
					<var>$namespace</var>
			)</code>

			<div class="short">
				
<p>Changes namespace; allows more users to share a session.</p>

			</div>

			<div class="detailed">
				
<p>Changes namespace; allows more users to share a session.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$namespace</code> string <br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="1 getNamespace" id="_getNamespace">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				string
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getNamespace">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#74" title="go to source code"><b>getNamespace</b></a>(
			)</code>

			<div class="short">
				
<p>Returns current namespace.</p>

			</div>

			<div class="detailed">
				
<p>Returns current namespace.</p>




					<h4>Returns</h4>
					<div class="smallList">string </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 getRoles" id="_getRoles">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				array
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getRoles">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#80" title="go to source code"><b>getRoles</b></a>(
			)</code>

			<div class="short">
				
<p>Returns a list of roles that a user has been granted.</p>

			</div>

			<div class="detailed">
				
<p>Returns a list of roles that a user has been granted.</p>




					<h4>Returns</h4>
					<div class="smallList">array </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 isInRole" id="_isInRole">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_isInRole">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#86" title="go to source code"><b>isInRole</b></a>(
					string
					<var>$role</var>
			)</code>

			<div class="short">
				
<p>Is a user in the specified role?</p>

			</div>

			<div class="detailed">
				
<p>Is a user in the specified role?</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$role</code> string <br />
					</div>

					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 isAllowed" id="_isAllowed">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				bool
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_isAllowed">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#93" title="go to source code"><b>isAllowed</b></a>(
			)</code>

			<div class="short">
				
<p>Has a user access to the Resource?</p>

			</div>

			<div class="detailed">
				
<p>Has a user access to the Resource?</p>




					<h4>Returns</h4>
					<div class="smallList">bool </div>


			</div>
			</td>
		</tr>
		<tr data-order="1 setAuthorizationHandler" id="_setAuthorizationHandler">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				void
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_setAuthorizationHandler">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#99" title="go to source code"><b>setAuthorizationHandler</b></a>(
					<a href="Nette.Security.IAuthorizator.html">Nette\Security\IAuthorizator</a>
					
					<var>$handler</var>
			)</code>

			<div class="short">
				
<p>Sets authorization handler.</p>

			</div>

			<div class="detailed">
				
<p>Sets authorization handler.</p>



					<h4>Parameters</h4>
					<div class="smallList">
						<code>$handler</code> <a href="Nette.Security.IAuthorizator.html">Nette\Security\IAuthorizator</a> <br />
					</div>



			</div>
			</td>
		</tr>
		<tr data-order="1 getAuthorizationHandler" id="_getAuthorizationHandler">
			<td align="right" width="1%"><code class="nowrap">
				 public 
				<a href="Nette.Security.IAuthorizator.html">Nette\Security\IAuthorizator</a>
				
				</code>
			</td>

			<td>
			<a class="anchor" href="#_getAuthorizationHandler">#</a>
			<code class="nowrap">
				<a href="source-Web.IUser.php.html#106" title="go to source code"><b>getAuthorizationHandler</b></a>(
			)</code>

			<div class="short">
				
<p>Returns current authorization handler.</p>

			</div>

			<div class="detailed">
				
<p>Returns current authorization handler.</p>




					<h4>Returns</h4>
					<div class="smallList"><a href="Nette.Security.IAuthorizator.html">Nette\Security\IAuthorizator</a> </div>


			</div>
			</td>
		</tr>

		</table>
	</div>









</div>

	<div id="footer">
		Nette Framework API documentation generated by <a href="http://apigen.org">ApiGen</a>
	</div>
</div>
</body>
</html>
